<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"/>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>4拼团-我发起的成团</title>
<link  href="/pintuan/Public/Wechat/api/css/style.css" rel="stylesheet"  type="text/css">
<script type="text/javascript" src="/pintuan/Public/Wechat/api/js/jquery-1.7.min.js"></script>
<script type="text/javascript" src="/pintuan/Public/Wechat/api/js/wmx80.js"></script>
<script type="text/javascript" src="/pintuan/Public/Wechat/api/js/Vip/groupdetail.js"></script>
<script type="text/javascript">$("document").ready(groupdetail_obj.groupdetail_init);</script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript" src="/pintuan/Public/Wechat/js/share1.js"></script>
<script>
			
			
			var domain={
	            www:'<?php echo C('WEB_ABSOLUTE_URL');?>',
	            static:'<?php echo C('WEB_ABSOLUTE_URL');?>',
	            img:'<?php echo C('WEB_ABSOLUTE_URL');?>',
	            file:'<?php echo C('WEB_ABSOLUTE_URL');?>',
	            kf:'<?php echo C('WEB_ABSOLUTE_URL');?>'
			    };	
				var config={
						 appid: '<?php echo ($userconfiginfo["appid"]); ?>',
						 timestamp:'<?php echo ($signpackage["timestamp"]); ?>',
						 nonceStr:'<?php echo ($signpackage["nonceStr"]); ?>',
						 signature:'<?php echo ($signpackage["signature"]); ?>',
				}
			
			var share={
					title:'<?php echo ($share["title"]); ?>',
					desc:'<?php echo ($share["desc"]); ?>',
					img_url:'<?php echo ($share["imgpath"]); ?>',
					url:'<?php echo ($share["url"]); ?>'
				}
		    share_obj.shareConfig_init(config);
			share_obj.share_init(share);
			
		</script>

</head>

<body bgcolor="#f5f5f5">
<div class="header">
	<h1>团详情</h1>
    <a href="javascript:history.back()" class="arrow-wrap"><em class="arrow-left"></em></a>
    <a href="?s=/Vip/index"><img src="/pintuan/Public/Wechat/api/images/me1.png"></a>
</div>
<div id="current-time"></div>
<div class="pd10 launchgroup">
	<div class="section1 bgfff clearfix">
    	<div class="pic"><img src="<?php echo ($grouplog["headimgurl"]); ?>"></div>
        <div class="timewrap">
        	<div class="title"><?php echo ($grouplog["nickname"]); ?>发起的团购</div>
            <?php if($group["period"] == 0): if($group["status"] == 1): ?>&nbsp;<?php endif; ?>
	            		<?php if($group["status"] == 2): ?>已成团<?php endif; ?>
	            		<?php if($group["status"] == 3): ?>已发货<?php endif; ?>
	            		<?php if($group["status"] == 4): ?>已完成<?php endif; ?>
	            		<?php if($group["status"] == 5): ?>已取消<?php endif; ?>
	            		<?php if($group["status"] == 6): ?>已过期<?php endif; ?>
	            	<?php else: ?>
		            	<?php if($group["status"] == 1): ?><em>还有</em><div class="time"></div>结束<?php endif; ?>
	            		<?php if($group["status"] == 2): ?>已成团<?php endif; ?>
	            		<?php if($group["status"] == 3): ?>已发货<?php endif; ?>
	            		<?php if($group["status"] == 4): ?>已完成<?php endif; ?>
	            		<?php if($group["status"] == 5): ?>已取消<?php endif; ?>
	            		<?php if($group["status"] == 6): ?>已过期<?php endif; endif; ?>
        </div>
    </div>
    <div class="section2 bgfff">
    	<dl class="clearfix">
        	<dt><img src="<?php echo ($grouplog["productcoverimg"]); ?>"></dt>
        	<dd><p><?php echo ($grouplog["productname"]); ?></p></dd>
            <dd><i>成团价：￥<?php echo ($grouplog["productprice"]); ?></i><span>市场价：<em>￥<?php echo ($grouplog["oriprice"]); ?></em></span></dd>
            <dd><a href="?s=/Mall/productDetail/id/<?php echo ($grouplog["productid"]); ?>">点击查看产品详情</a></dd>
    	</dl>
    </div>
    <div class="section3 bgfff">
    	<div class="title">已有<?php echo ($group["hasjoin"]); ?>人参团，距离成团仅剩<?php echo ($group["wanting"]); ?>个名额</div>
        <ul class="cont clearfix">
        	<?php if(is_array($headimg)): $i = 0; $__LIST__ = $headimg;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$headimgurl): $mod = ($i % 2 );++$i; if($headimgurl["imgurl"] == null): ?><li><a href="#"><img src="/pintuan/Public/Wechat/api/images/jiaico.png"></a></li>
        			<?php else: ?>
        			<li><a href="#"><img src="<?php echo ($headimgurl["imgurl"]); ?>"></a></li><?php endif; ?>
            <!-- <li><a href="#"><img src="/pintuan/Public/Wechat/api/images/jiaico.png"></a></li>
            <li><a href="#"><img src="/pintuan/Public/Wechat/api/images/jiaico.png"></a></li> --><?php endforeach; endif; else: echo "" ;endif; ?>
        </ul>
    </div>
    <div class="fixedwrap">
    	<div class="btns"><a href="javascript:;">邀请好友参团吧！</a></div>
    </div>
</div>
<div class="sharetips"><img src="/pintuan/Public/Wechat/api/images/sharetips.png"></div>
<script type="text/javascript" src="/pintuan/Public/Wechat/api/js/jquery.downCount.js"></script> 
<script type="text/javascript">
	//var grouplogcreatetime = "<?php echo ($grouplog["createtime"]); ?>";
	var grouplogperiod = "<?php echo ($grouplog["period"]); ?>";
	var groupstatus = "<?php echo ($group["status"]); ?>";
	var groupid = "<?php echo ($grouplog["groupid"]); ?>";
	var grouplogisexpired = "<?php echo ($grouplog["isexpired"]); ?>";
	$(function(){
		$(".time").countdown({
		timestamp : grouplogperiod*1000
			//grouplogcreatetime*1000 + grouplogperiod*60*60*1000
	})
	})
</script>
</body>
</html>